package com.mi.rule.fastdfs;

import com.github.tobato.fastdfs.FdfsClientConfig;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.context.annotation.Import;
import org.springframework.jmx.support.RegistrationPolicy;

/**
 * FdfsClientConfig
 *
 * @author 王永吉
 */
@Slf4j
@Configuration
@Import(FdfsClientConfig.class)
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)// 解决jmx重复注册bean的问题
public class FastDFSConfig {
    private Logger logger = LoggerFactory.getLogger(getClass());

    //    @Autowired
    //    private FastFileStorageClient storageClient;

    //    @RequestMapping(value = "/public/testUp")
    //    public SRS testUp(@RequestParam Map<String, String> param) throws FileNotFoundException {
    //        File file = new File("D:\\eee.png");
    //        StorePath sp = storageClient.uploadFile("group1", new FileInputStream(file), file.length(), "png");
    //        return SRS.bySuccess();
    //    }
}
